/*
 * Printf.cpp
 *
 *  Created on: Jul 10, 2012
 *      Author: jmurray
 */

#include "Printf.h"

void p(const char *fmt, ... ){
        char tmp[128]; // resulting string limited to 128 chars
        va_list args;
        va_start (args, fmt );
        vsnprintf(tmp, 128, fmt, args);
        va_end (args);
        for(int i=0;i<128;i++){
           if(tmp[i]=='\0')
              break;
           Serial.print(tmp[i]);
           if(tmp[i]=='\n')
              Serial.print('\r');
        }
        //Serial.print(tmp);
}

